//    Copyright (C) Kherty.  All rights reserved.
using System;
using System.Windows.Data;
using System.Windows.Media;

namespace OpenLS.Drawing.UI.Internals
{
    class LineCapConverter: IValueConverter
    {
        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            switch ((LineCap) value)
            {
            
                case LineCap.Flat:
                    return PenLineCap.Flat;
                case LineCap.Round:
                    return PenLineCap.Round;
                case LineCap.Square:
                    return PenLineCap.Square;
                default: throw new NotSupportedException();
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotSupportedException();
        }

        #endregion
    }
}